FROM ubuntu:14.04
RUN apt-get -y update
RUN apt-get -y install curl
RUN apt-get -y install lib32gcc1
RUN sudo dpkg --add-architecture i386
RUN apt-get -y update
RUN apt-get -y install libcurl4-gnutls-dev:i386
WORKDIR /root
RUN curl -L -O https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
RUN tar -zxf steamcmd_linux.tar.gz
RUN ./steamcmd.sh +login anonymous +force_install_dir /root/dst +app_update 343050 -validate +quit
RUN rm -f /root/dst/mods/dedicated_server_mods_setup.lua
COPY ./Cluster_1 /root/.klei/DoNotStarveTogether/Cluster_1
COPY ./update.sh /root/
RUN chmod +x /root/update.sh
RUN apt-get -y install screen vim
COPY ./start_dst.sh /root/
RUN chmod +x /root/start_dst.sh
VOLUME ["/root/.klei/DoNotStarveTogether/Cluster_1","/root/dst/mods/dedicated_server_mods_setup.lua"]
EXPOSE 10999/udp

CMD ./start_dst.sh
